extends HBoxContainer
@onready var root = $"."

# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.

func _get_working_periods()->Array[int]:
	var periods:Array[int] = []
	if %w1.button_pressed:
		periods.append(1)
	
	if %w2.button_pressed:
		periods.append(2)
		
	if %w3.button_pressed:
		periods.append(3)
		
	if %w4.button_pressed:
		periods.append(4)
	
	return periods
	
func _set_periods(periods:Array[int]):
	for i in range(root.get_child_count()):
		var child:Button = root.get_child(i)
		child.button_pressed = i+1 in periods
	
